//
//  CrossSlipDetailOneCell.m
//  shise
//
//  Created by 徐国庆 on 14/12/20.
//  Copyright (c) 2014年 MZP. All rights reserved.
//

#import "CrossSlipDetailOneCell.h"

@implementation CrossSlipDetailOneCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        
        self.activityImageView = [[UIImageView alloc] init];
        [self.contentView addSubview:self.activityImageView];
        self.activityImageView.userInteractionEnabled = YES;
//        self.activityImageView.backgroundColor = [UIColor redColor];
        [self.activityImageView release];
        self.userHeadImageViewButton = [UIButton buttonWithType:UIButtonTypeRoundedRect];
        [self.activityImageView addSubview:self.userHeadImageViewButton];
        
        self.activityName = [[UILabel alloc] init];
        [self.activityImageView addSubview:self.activityName];
//        self.activityName.backgroundColor = [UIColor blackColor];
        self.activityName.textColor = [UIColor whiteColor];
        self.activityName.textAlignment = NSTextAlignmentCenter;
        self.activityName.font = [UIFont systemFontOfSize:20];
        [self.activityName release];
        
        self.joinCount = [[UILabel alloc] init];
        [self.activityImageView addSubview:self.joinCount];
//        self.joinCount.backgroundColor = [UIColor blackColor];
//        self.activityName.textAlignment = NSTextAlignmentCenter;
        self.joinCount.textAlignment = NSTextAlignmentCenter;
        self.joinCount.textColor = [UIColor whiteColor];
        [self.joinCount release];
        
    }
    return self;
}

- (void)layoutSubviews
{
    [super layoutSubviews];
//    self.mohu.frame = CGRectMake(0, 0, self.contentView.frame.size.width, self.contentView.frame.size.height);
    self.activityImageView.frame = self.contentView.frame;
    self.activityName.frame = CGRectMake(0, 60, self.contentView.frame.size.width, 40);
    self.joinCount.frame = CGRectMake(0, 100, self.contentView.frame.size.width, 30);
    self.userHeadImageViewButton.frame = CGRectMake(0, 0, self.activityImageView.frame.size.width, self.activityImageView.frame.size.height);
}

- (void)dealloc
{
    [_activityImageView release];
    [_activityName release];
//    [_mohu release];
    [_joinCount release];
    [_userHeadImageViewButton release];
    [super dealloc];
}
- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
